'use strict'

const WebSocket = require('ws');

for(let i = 0; i<10 ; i++){

  let ws = new WebSocket('ws://127.0.0.1:7890/notice?id=1123' + i);
  ws.on('open', function open() {
    ws.send('something');
  });

  ws.on('message', function incoming(data) {
    console.log('client : ' + data);
  });

  // setTimeout(() => {
  //   ws.close();
  // }, 5000 * i);

}